package com.imooc.pay.config;

import com.lly835.bestpay.enums.OrderStatusEnum;

/**
 * @ClassName OrderStatusTestEnum
 * @Description: TODO
 * @Author wgc
 * @Date 2020/12/11 18:00
 * @Version V1.0
 **/
public enum  OrderStatusTestEnum {

    SUCCESS("支付成功"),
    REFUND("转入退款"),
    NOTPAY("未支付"),
    CLOSED("已关闭"),
    REVOKED("已撤销（刷卡支付）"),
    USERPAYING("用户支付中"),
    PAYERROR("支付失败"),
    UNKNOW("未知状态");

    private String desc;

    private OrderStatusTestEnum(String desc) {
        this.desc = desc;
    }

    public static OrderStatusTestEnum findByName(String name) {
        OrderStatusTestEnum[] var1 = values();
        int var2 = var1.length;

        for(int var3 = 0; var3 < var2; ++var3) {
            OrderStatusTestEnum orderStatusEnum = var1[var3];
            if (name.toLowerCase().equals(orderStatusEnum.name().toLowerCase())) {
                return orderStatusEnum;
            }
        }

        throw new RuntimeException("错误的微信支付状态");
    }

    public String getDesc() {
        return this.desc;
    }


}
